/* Turska UI library
 * Copyright 2003-2008 Jetro Lauha
 * All rights reserved.
 * Web: http://iki.fi/jetro/ or http://jet.ro
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of EITHER:
 *   (1) The GNU Lesser General Public License as published by the Free
 *       Software Foundation; either version 2.1 of the License, or (at
 *       your option) any later version. The text of the GNU Lesser
 *       General Public License is included with this library in the
 *       file LICENSE-LGPL.txt.
 *   (2) The BSD-style license that is included with this library in
 *       the file LICENSE-BSD.txt.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files
 * LICENSE-LGPL.txt and LICENSE-BSD.txt for more details.
 *
 * $Id: UIGraphicsSDLCFL.h,v 1.2 2008/03/27 11:44:24 tonic Exp $
 * $Revision: 1.2 $
 */

#ifndef UIGRAPHICSSDLCFL_H_INCLUDED
#define UIGRAPHICSSDLCFL_H_INCLUDED


class CFL;

//! CFL supporting extension to the UIGraphicsSDL.
class UIGraphicsSDLCFL : public UIGraphicsSDL
{
public:

    UIGraphicsSDLCFL(CFL *cfl) : mCFL(cfl) {}
    virtual ~UIGraphicsSDLCFL() {}

    // From UIGraphics:

    //! Loads an image with a given file name.
    /*! This implementation uses the currently set CFL object to load the
     *  images from if the CFL object isn't NULL. If the image file isn't
     *  found from the CFL then it will be load from the disk as usual.
     * \return image object if successful, or NULL if unsuccessful.
     */
    virtual UIImage * loadImage(const char *fileName);

    virtual SDL_Surface * loadSurface(const char *fileName);

    //! Returns current CFL object.
    CFL * getCFL() { return mCFL; }
    //! Sets current CFL object.
    void setCFL(CFL *cfl) { mCFL = cfl; }

protected:
    
    CFL *mCFL;
};


#endif // !UIGRAPHICSSDLCFL_H_INCLUDED
